package com.liangwj.springbootdesignpatterns.structureTypePatterns.filter.demo_2;
/**
 * <b>Description:</b> 创建筛选管理器 <br/>
 * @author Lingwenjun
 * @date 2019/1/25-10:27
 * @version 1.0
 */
public class FilterManager {

    FilterChain filterChain;

    public FilterManager(Target target) {
        filterChain = new FilterChain();
        filterChain.setTarget(target);
    }

    public void setFilter(Filter filter) {
        filterChain.addFilter(filter);
    }

    public void filterRequest(String request) {
        filterChain.execute(request);
    }
}
